package cn.analysis.project.controller;

import cn.analysis.common.ResultVO;
import cn.analysis.project.service.ISysLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/** 分层健康度 */
@RestController
@RequestMapping("/level")
public class LevelCotroller {

    @Autowired
    private ISysLevelService levelService;

    /** 获取实时分层健康度 */
    @RequestMapping(value = "/selectListNow", method = RequestMethod.GET)
    public ResultVO selectListNow(String code){
        return ResultVO.success(levelService.selectListNow(code));
    }

    /** 按照分类方式和行政区划编码获取历史分层健康度 */
    @RequestMapping(value = "/selectListByGroup", method = RequestMethod.GET)
    public ResultVO selectListByGroup(String group, String code){
        return ResultVO.success(levelService.selectListHisByGroup(group, code));
    }

}
